<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./lib/vue.js"></script>
    <script src="./lib/elementui.js"></script>
    <link rel="stylesheet" href="./lib/elementui.css">
</head>

<body>
    <div id="postList">
        <div class="header">
            <div class="not-login" v-if="userName==null">
                <span><a href="Login.html" style="color:#eee">登录</a> </span>
                <span>注册</span>

            </div>
            <div class="logined" v-else>
                <span>{{userName}}</span>
                <span @click="logout">注销</span>

            </div>
        </div>
        <div class="plate-show">
            <div class="navi"></div>
            <div class="backgroup">
                <img src="./assets/images/120255ccxhvvggvtvconrr.png" alt="">
                <h2>《全面战争：三国》等你来战</h2>
            </div>
        </div>
        <div class="send-post">
            <el-button type="primary">发帖</el-button>
        </div>
        <div class="post-list">
            <table>
                <thead>
                    <tr>
                        <td colspan="2">
                            <span>全部主题</span>
                            <span>最新</span>
                            <span>热门</span>
                            <span>热帖</span>
                            <span>精华</span>
                        </td>
                        <td>作者</td>
                        <td>回复/查看</td>
                        <td>最后发表</td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td style="width: 32px;padding-left: 5px;">
                            <img src="./assets/images/folder_new.gif" alt="">
                        </td>
                        <td>
                            <span><a class="post-type" href="javascript:;">[帖子种类]</a></span>
                            <a href="./PostDetail.html">帖子标题</a>
                        </td>
                        <td style="width: 135px;">
                            <p>Ace</p>
                            <p>2021-3-18 23:00</p>
                        </td>
                        <td style="width: 66px;">
                            <p>996</p>
                            <p>1007</p>
                        </td>
                        <td style="width: 120px;">
                            <p>Taro</p>
                            <p> 2021-3-18 23:01</p>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 32px;padding-left: 5px;">
                            <img src="./assets/images/folder_new.gif" alt="">
                        </td>
                        <td><span>[帖子种类]</span>帖子标题</td>
                        <td style="width: 135px;">
                            <p>Ace</p>
                            <p>2021-3-18 23:00</p>
                        </td>
                        <td style="width: 66px;">
                            <p>996</p>
                            <p>1007</p>
                        </td>
                        <td style="width: 120px;">
                            <p>Taro</p>
                            <p> 2021-3-18 23:01</p>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 32px;padding-left: 5px;">
                            <img src="./assets/images/folder_new.gif" alt="">
                        </td>
                        <td><span>[帖子种类]</span>帖子标题</td>
                        <td style="width: 135px;">
                            <p>Ace</p>
                            <p>2021-3-18 23:00</p>
                        </td>
                        <td style="width: 66px;">
                            <p>996</p>
                            <p>1007</p>
                        </td>
                        <td style="width: 120px;">
                            <p>Taro</p>
                            <p> 2021-3-18 23:01</p>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="post-page">
            <el-pagination background layout="prev, pager, next" :page-size="30" :total="1000">
            </el-pagination>
        </div>
    </div>
</body>
<script>
    new Vue({
        el: "#postList",
        data:{
            userName:sessionStorage["username"]
        },
        methods: {
            logout:function(){
                localStorage.clear();
                sessionStorage.clear();
                this.userName = null;
            }
        },
    })
</script>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    a{
        text-decoration: none;
        color:#333;
    }
    a.post-type{
        color:blue;
    }
    a:hover{
        text-decoration: underline;
    }
    .header {
        width: 100%;
        height: 36px;
        line-height: 36px;
        padding-right: 10px;
        background-color: #000;
        text-align: right;
    }

    .header .not-login span,
    .header .logined span {
        color: #fff;
    }

    .plate-show {
        width: 98%;

        margin: 20px auto;
        border: 1px solid #ccc;

    }

    .plate-show .navi {
        height: 36px;
    }

    .plate-show .backgroup {
        text-align: center;
    }

    .plate-show .backgroup h2 {
        color: blue;
        margin: 10px 0;
    }

    .send-post {
        width: 98%;
        margin: auto;
    }

    .post-list {
        width: 98%;
        margin: 16px auto;
        border: 1px solid #ccc;
        border-bottom: 0 none;
    }

    .post-list table {
        border-collapse: collapse;
        width: 100%;
        font-size: 14px;
    }

    .post-list table thead tr td {
        background-color: #eee;
        height: 40px;
    }

    .post-list table thead tr td span {
        margin-left: 16px;
        color: blue;
    }

    .post-list table tr td {
        border-bottom: 1px solid #ccc;
        height: 40px;
    }

    .post-list table tr td span {
        color: blue;
        padding-right: 10px;
    }

    .post-list table tr td p:last-child {
        color: #999;
    }

    .post-page {
        text-align: right;
        margin-bottom: 36px;
    }
</style>

</html>